package com.weng.cloud.service8881.redis;

import com.weng.cloud.starter.redis.service.SerializedRedisService;
import com.weng.cloud.commons.base.JsonUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: weng
 * @Date: 2022/3/16
 * @Description: com.weng.cloud.service8881.redis
 */
@RestController
public class TestRedisController {

    @Resource
    private SerializedRedisService serializedRedisService;

    @GetMapping("/testRedis")
    public String testRedis(){
        return JsonUtil.toText(this.serializedRedisService.hmget("weng-cloud-client-test-key"));
    }
}
